package com.casit.base.exception;

import com.casit.base.enums.ResultEnum;

public class ResultException extends RuntimeException {
    private int code;
    public ResultException(ResultEnum resultEnum){
        this(resultEnum.getCode(),resultEnum.getMessage());
    }
    public ResultException(int code,String message){
        super(message);
        this.code=code;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
